<template>
  <div class="container">
   
 <button @click="getright">get子组件</button>
    <my-left></my-left>
    <my-right ref="right"></my-right>
  </div>
</template>

<script>
import MyLeft from './components/MyLeft.vue'
import MyRight from './components/MyRight.vue'
export default {
  data () {
    return {
      flag: true
    }
  },
  methods: {
    getright(){
      console.log(this);
   this.$refs.right.show()
    }
    
  },
  components: { MyLeft, MyRight },
}
</script>

<style lang="less" scoped>

</style>